<?php 
defined('IN_IXDCW') or exit('Access Denied');
Env::checkReferer() or exit;
if($auth) {
	$string = Crypt::decode($auth);
	if(preg_match("/^[a-z0-9_@\-\s\/\.\,\(\)\+]+$/i", $string)) {
		header("content-type:image/png");
		$imageX = strlen($string)*10;
		$imageY = 20;
		$im = @imagecreate($imageX, $imageY) or exit();
		imagecolorallocate($im, 255, 255, 255);
		$color = imagecolorallocate($im, 0, 0, 0);

		$fontFile = DT_ROOT . '/file/font/VeraMono.ttf';
		if (file_exists($fontFile)) {
			imagettftext($im, 11, 0, 0, 17, $color, $fontFile, $string);
		} else {
			imagestring($im, 5, 0, 5, $string, $color);
		}

		imagepng($im);
		imagedestroy($im);
	}
}